package cn.submarine;

import javax.swing.*;
import java.util.Random;

public class MineSubmarine extends SeaObject implements EnemyLive{

    public MineSubmarine() {
        super(63,19);
    }

    public void move () {
        x += speed;//向右移动
    }

    @Override
    public ImageIcon getImage() {
        return Images.minesubm;
    }

    public Mine shootMine() {//发射水雷
        int x = this.x + width;
        int y = this.y - 5;
        return new Mine(x, y);
    }

    @Override
    public int getLive() {
        return 1;
    }
}
